<%@page import="java.io.PrintWriter"%>
<%@ page pageEncoding="utf-8"%>

<%
	String start = request.getParameter("start");
	String limit = request.getParameter("limit");
	try {
		int index = Integer.parseInt(start);
		int size = Integer.parseInt(limit);
		
		String json="{total:100,root:[";
		for(int i = index; i < size + index; i++) {
			json += "{id:" + i + ",name:'name" + i + "',value:'" + i + "'}";
			if(i != size + index - 1) {
				json += ",";
			}
		}
		
		json += "]}";
		
		PrintWriter pw = response.getWriter();
		pw.write(json);
		pw.flush();
	}
	catch (Exception e) {
		e.printStackTrace();
	}

%>